package com.itc.bi.dto;

import com.itc.bi.constant.SystemConstant;
import com.itc.bi.entity.DataProcessEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author : xuzy
 */
@Data
public class DataProcessListDto {

    @ApiModelProperty(value = "数据加工列表")
    List<DataSetListDto> process = new ArrayList<>();

    @ApiModelProperty(value = "聚合指标")
    List<DataSetListDto> aggregate = new ArrayList<>();

    public void add(String type,DataSetListDto dto){
        if(SystemConstant.PROCESS_TYPE_PROCESS.equals(type)){
            process.add(dto);
        }else if(SystemConstant.PROCESS_TYPE_AGGREGATE.equals(type)){
            aggregate.add(dto);
        }
    }
}
